package com.ahut.gsmcommon.service;

import com.ahut.gsmcommon.entity.User;
import com.ahut.gsmcommon.repository.UserRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @Author gan.sumin@mail.com
 * @data 2018/6/1916:22
 * @description
 */
@Service
@Slf4j
public class UserService {
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private UserRepository userRepository;
    public User getUserInfo(Integer id){
        User user = userRepository.getOne(id);
        if(user != null){
        }
        return user;
    }
    public void saveUser(User user){
        userRepository.save(user);
    }
}
